import { request } from './request'

export async function getCategoriesList(data: any) {
    return request({
        url: '/categories',
        params:data
    })
}

export async function addCategories(data: any) {
    return request({
        url: '/categories',
        method: 'POST',
        data
    })
}

export async function delCategories(data: any) {
    return request({
        url: `/categories/${data.id}`,
        method: 'DELETE',
        data
    })
}

export async function editCategories(data: any) {
    return request({
        url: `/categories/${data.id}`,
        method: 'PUT',
        data
    })
}